www.gusucode.com > 深度学习(asp)网址导航 v4.0.1 > 深度学习(asp)网址导航 v4.0.1\code\admin\Site\sort_Manage.asp

    <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<%
projectRootPath = "../../"	'相对当前应用程序根的位置
%>
<!-- #include file ="../include/checkPurview.asp"-->
<!--#include file="../../ConnDB.asp"-->

<!--#include file="../../include/Function.Common.asp"-->
<!-- #include file="../include/Function.Manage.Config.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noindex,nofollow" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>类别管理</title>
    <link href="../themes/<%=theme_Path%>/main.css" rel="stylesheet" type="text/css" />
</head>

<body  id="bodyBg1">
<br />
&nbsp; <a href="sort_Manage.asp">类别管理</a> |&nbsp; <a href="sort_Add.asp">类别添加</a>
<hr color="#0099FF" size="1" />
<br />
<dl class="manageContent">
    <dt>类别管理</dt>
    <dd>
    	<br />
<%
set rsRoot =server.CreateObject("adodb.recordset")
sqlRoot="select * from deep_WebSort where fparentID=0 order by forderID"
rsRoot.open sqlRoot,conn,0,1
if rsRoot.eof and rsRoot.bof then
	response.Write("<p>暂时没有分类!!请添加分类!</p>")
else

%>
<div class="class_kuai">
<div class="class_hang">
    <span class="class_lie1">&nbsp;分类名称</span>
    <span class="class_lie2">排序ID</span>
    <span class="class_lie3">管  理</span>
</div>

	<%
	while not rsRoot.eof
		suo=0	'下级分类缩格快 块数
	%>

<div class="class_hang" onMouseOver="this.style.background='#f0f8ff'" onMouseOut="this.style.background='#fcfcfc'"  >
        <span class="class_lie1">
        &nbsp; <strong><a href="url_Manage.asp?id=<%=rsRoot("fid_Sort")%>" title="点击查看分类"><%=rsRoot("fname")%></a></strong>
		<%if rsRoot("fplace")=1 then%>  <font color="#FF0000">*</font>
		<%elseif rsRoot("fplace")=2 then%>  <font color="#0000FF">#</font>
		<%else%>&nbsp;
	    <%end if%>
        
        
        </span>
        <span class="class_lie2">
        <%=rsRoot("fOrderID")%>
        </span>
        <span class="class_lie3">
        
        <a href="sort_Update.asp?id=<%=rsRoot("fid_Sort")%>">修改</a>
		 |&nbsp; 	 
		 <%
			'检查是否有子类 start           
            if isSub( "deep_WebSort","fparentID",rsRoot("fid_Sort")) then
				response.Write("<font color='#CCCCCC' title='有子分类 不可删除'>删除</font>")
			else
            %>
                 <a href="sort_DEL.asp?id=<%=rsRoot("fid_Sort")%>" onClick="return confirm('删除后将不能恢复,你确定删除么?')">删除</a>
			<%
		 	end if
			'检查是否有子类 end
		%>
        </span>&nbsp;
		</div>


	<%
		call subList(rsRoot("fid_Sort"),suo)
	rsRoot.moveNext
wend
%>

<%
end if
rsRoot.close
set rsRoot=nothing
%>

</div>
        <br />
    </dd>
</dl>
<br />
<div align="center">
    <font color="#FF0000">*</font> 表示在首页酷站大全栏目显示
    <font color="#0000FF">#</font> 表示左侧栏目显示
</div>


</body>
</html>

<%
Call CloseConnDB()

'┌──────────────────── 深度空间 深度学习 ──┐
'│函数名:subList(ClassID,suo)
'│作  用:递归读取子分类函数                     
'│参  数:ClassID:父ID号  suo:
'│返回值:
'│日  期:2006/4/21
'└──────────────────── www.DeepTeach.com ──┘
sub subList(ClassID,suo)
%>
<%
   set rsSub =server.CreateObject("adodb.recordset")
   sqlSub="select * from deep_WebSort where fparentID=" & ClassID &" order by fOrderID"
   rsSub.open sqlSub,conn,1,1
   if rsSub.eof and rsSub.bof then
   else
	for i=1 to rsSub.recordCount
    %>
     <div class="class_hang" onMouseOver="this.style.background='#f0f8ff'" onMouseOut="this.style.background='#fcfcfc'"  >
        <span class="class_lie1">
		<%=kong(i,rsSub.recordCount,suo)%>
        <a href="url_Manage.asp?id=<%=rsSub("fid_Sort")%>" title="点击查看分类"><%=rsSub("fname")%></a></strong>
		<%if rsSub("fplace")=1 then%>  <font color="#FF0000">*</font>
		<%elseif rsSub("fplace")=2 then%>  <font color="#0000FF">#</font>
		<%else%>&nbsp;
	    <%end if%>
        </span>
        <span class="class_lie2"><%=rsSub("fOrderID")%>
        </span>
        <span class="class_lie3"><a href="sort_Update.asp?id=<%=rsSub("fid_Sort")%>">修改</a>
		 |&nbsp; 	 
		 <%
			'检查是否有子类 start           
            if isSub("deep_WebSort","fparentID",ClassID) then
            %>
                 <a href="sort_DEL.asp?id=<%=rsSub("fid_Sort")%>" onClick="return confirm('删除后将不能恢复,你确定删除么?')">删除</a>
			<%
			else
				response.Write("<font color='#CCCCCC' title='有子分类 不可删除'>删除</font>")
		 	end if
			'检查是否有子类 end
		%>
        </span>
     </div>
	<%
        call subList(rsSub("fid_Sort"),suo+1)
        rsSub.moveNext
     next
	end if
    rsSub.close
    set rsSub=nothing

end sub
function kong(i,ClassCount,suo)
	if i=ClassCount then
		kong="&nbsp; &nbsp; └ " 
	else
		kong="&nbsp; &nbsp; ├ " '├│└┊╰
	end if
	if suo<>0 then
		for s=1 to suo
			lianXian=lianXian & "&nbsp; &nbsp; ┊ "		'┃┗┣
		next
	end if
	kong = lianXian & kong
end function
%>